package com.jingbian.cppccbackend.service.user;

import com.github.pagehelper.PageInfo;
import com.jingbian.cppccbackend.entity.PublicOpinions;
import com.jingbian.cppccbackend.entity.dto.PublicOpinionPublicDTO;
import com.jingbian.cppccbackend.entity.dto.SearchPublicOpinionDTO;
import com.jingbian.cppccbackend.entity.dto.SubmitPublicOpinionDTO;
import com.jingbian.cppccbackend.entity.vo.PublicOpinionDetailVO;

import java.util.List;
import java.util.Map;
import org.springframework.core.io.ByteArrayResource;

public interface PublicOpinionsService {
    /**
     * 提交社情民意
     */
    void submitPublicOpinions(SubmitPublicOpinionDTO submitPublicOpinionDTO);

    /**
     * 获取用户的社情民意列表
     */
    PageInfo<PublicOpinions> getPublicOpinionsByUserId(SearchPublicOpinionDTO searchDTO);

    /**
     * 获取社情民意详情
     */
    PublicOpinionDetailVO getDetailById(Integer opinionId);

    /**
     * 获取公示的社情民意列表
     */
    PageInfo<PublicOpinions> getSearchPublic(PublicOpinionPublicDTO publicOpinionPublicDTO);

    /**
     * 生成社情民意文档
     */
    ByteArrayResource generateOpinionDoc(Map<String, String> data);

    Integer applyCancelOpinion(Integer opinionId);
}
